Intent to Prototype and Ship: IntersectionObserver scrollMargin

51 views
Skip to first unread message

Keith Cirkel

unread,
May 29, 2025, 3:14:58 PM (5 days ago) May 29
to dev-pl...@mozilla.org
Summary:
  Adds the `scrollMargin` property to IntersectionObserverInit, which factors into the intersection calculations.

Bug:

Specification:

Standards Body:
  W3C

Platform coverage:
  all.

Preference:
  dom.intersection_observer.scroll_margin.enabled

DevTools bug:
  N/A

Link to standards-positions discussion:
  N/A

Other browsers:
  Blink: Implemented & Shipped in M120 (https://chromestatus.com/feature/5091020593430528).

web-platform-tests:

Over the coming weeks I intend to implement the `scrollMargin` property on IntersectionObserver. I aim to have this ready and enabled for the 141 milestone (June 19 soft freeze). 

Worth pointing out: using scroll margin for lazy loading is a separate feature (tracked in https://bugzilla.mozilla.org/show_bug.cgi?id=1864794) which is dependent on this feature, but will ship independently of this.
Reply all
Reply to author
Forward
0 new messages